package uk.co.q3c.deplan.client.domain.resource;

import java.io.Serializable;

import javax.persistence.Id;

import uk.co.q3c.deplan.client.domain.AbstractDomainObject;
import uk.co.q3c.deplan.client.service.ServiceFactory;

import com.googlecode.objectify.annotation.Cached;
import com.googlecode.objectify.annotation.Unindexed;

/**
 * @see IndividualResource
 * @see ResourceGroup
 * @author David Sowerby 14 Feb 2010
 * 
 */
@Unindexed
@Cached(expirationSeconds = 600)
public abstract class AbstractResource extends AbstractDomainObject implements Resource, Serializable {

	private static final long serialVersionUID = 1L;
	@Id
	private Long keyId;

	protected AbstractResource() {
		super();
	}

	protected AbstractResource(ServiceFactory connection) {
		super(connection);
	}

	@Override
	public String getCounterGroup() {
		return "resource";
	}

	public Long getKeyId() {
		return keyId;
	}

	public void setKeyId(Long keyId) {
		this.keyId = keyId;
	}

}
